import rxAjax from '@/assets/js/ajax.js';
import AtsAttenceGroupApi from "@/api/oa/ats/atsAttenceGroup";

//考勤档案 api接口
export const AtsAttendanceFileApi = {};

AtsAttendanceFileApi.baseUrl= '/api-oa/oa/ats/atsAttendanceFile';
AtsAttendanceFileApi.exportUrl= AtsAttendanceFileApi.baseUrl + '/listExport';

//查询列表
AtsAttendanceFileApi.query=function (parameter) {
  var url= AtsAttendanceFileApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
AtsAttendanceFileApi.get =function(pkId) {
  var url= AtsAttendanceFileApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
AtsAttendanceFileApi.save =function(parameter) {
  var url= AtsAttendanceFileApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
AtsAttendanceFileApi.del =function(parameter) {
  var url= AtsAttendanceFileApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

//查询全部数据
AtsAttendanceFileApi.getAll = function () {
  var url = AtsAttendanceFileApi.baseUrl + '/getAll';
  return rxAjax.get(url);
}

/*AtsAttenceGroupApi.getOrg = function (userId) {
  var url = AtsAttenceGroupApi.baseUrl + '/getOrg?userId=' + userId;
  return rxAjax.get(url);
}*/

export  default AtsAttendanceFileApi;

